﻿// -----------------------------------------------------------------------
// <copyright file="SaveImage.cs" company="FCIS">
// TODO: Update copyright text.
// </copyright>
// -----------------------------------------------------------------------

namespace LastVersionOfIpPackage.Operations
{
    using System;
    using System.Collections.Generic;
    using System.Drawing;
    using System.Linq;
    using System.Text;

    /// <summary>
    /// TODO: Update summary.
    /// </summary>
    public class SaveImage
    {
        /// <summary>
        /// static object of this class to use this without create object
        /// </summary>
        private static SaveImage save = new SaveImage();

        /// <summary>
        /// Gets or sets the save1.
        /// </summary>
        /// <value>
        /// The save1.
        /// </value>
        public static SaveImage Save1
        {
            get { return SaveImage.save; }
            set { SaveImage.save = value; }
        }

        /// <summary>
        /// Saves the image in specified path.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="image">The image.</param>
        public void Save(string path, Bitmap image)
        {
            try
            {
                image.Save(path + ".bmp");
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
                throw;
            }
        }
    }
}
